#ifndef CriticalSection_h
#define CriticalSection_h


class CriticalSection_T
{
private:
	CRITICAL_SECTION _cs;

public:
	CriticalSection_T() { InitializeCriticalSection(&_cs); };
	~CriticalSection_T() { DeleteCriticalSection(&_cs); };

public:
	void Enter() { EnterCriticalSection(&_cs); }
	void Leave() { LeaveCriticalSection(&_cs); }
};

#endif //CriticalSection_h